/**
 * Created by zhoua on 2016/12/13.
 */


var encyclopediaVm = new Vue({
    el: '#baike',
    data: {
        toggle: 1,    // 显示项 1.显示正在加载 2.显示数据 3显示暂无数据
        infoList: [],
        totalRow:0
    }
});

function getVmList(curr,type,VM,pagination){
    $.ajax({
        url: '/api/gz/lg/baike/baike.v',
        type: "POST",
        dataType: "json",
        data: {
            
        },
        error: function () {
            console.error("err");
            encyclopediaVm.toggle = 3;
        }
    }).done(function (data) {
        VM.toggle = 2;
        VM.infoList = data.data.dataList;
        VM.totalRow = VM.infoList.length;
        console.log(VM.infoList,VM.totalRow);
    });
}

getVmList(1, 6, encyclopediaVm, $("#pagination_page"));